<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>{$L.APP_NAME}</title>
<link href="http://g.alicdn.com/bui/bui/1.1.21/css/bs3/dpl.css" rel="stylesheet">
<link href="http://g.alicdn.com/bui/bui/1.1.21/css/bs3/bui.css" rel="stylesheet">
<script src="http://g.tbcdn.cn/fi/bui/jquery-1.8.1.min.js"></script>
<script src="http://g.alicdn.com/bui/seajs/2.3.0/sea.js"></script>
<script src="http://g.alicdn.com/bui/bui/1.1.21/config.js"></script>
<script src="/assets/kxdr/index.js"></script>
<script src="/assets/shopmanage/global_menu_jquery.js"></script>
	<style>
	h1 button,h2 button,h3 button,h4 button,.title button,.gift_hqfs button,.title a{ldelim}position:absolute{rdelim}
	a.js-edit {ldelim}margin-left:5px{rdelim}
	.mobile {ldelim}  display: inline-block;
		  padding-left: 25px;
		  background: url(//img.alicdn.com/tps/i2/T1tfzjFLdbXXXXERPb-25-80.png) 5px no-repeat;
	{rdelim}
	.pc {ldelim}  display: inline-block;
		  padding-left: 30px;
		  background: url(//img.alicdn.com/tps/i2/T1tfzjFLdbXXXXERPb-25-80.png) 5px 5px no-repeat;
	{rdelim}
	</style>
</head>
<body style="width:990px;margin:0 auto;padding:10px 0;">
<input type="hidden" class="curtool" value="{$curtool}" />
 <div class="doc-content">
    <div class="panel">
      <div class="panel-body">
	  
	  <div class="row">
		<div class="span24 doc-content">
		<h3 class="pull-left">{$L.APP_HOME} >> {$L.APP_NAME} >> {$L.SHOW_EVENT_LIST}</h3>
		<!-- <a class="button pull-right" style="margin-left:10px" href="/?m=Kxdr&c=Index&a=show_tools"><i class="icon-home"></i>{$L.SYS_RETURN}</a> -->
			
		<div class="button-group pull-right">
		  {include file='../../../PublicView/global_menu.html'}
		</div>
		</div>
	  </div>
	  <hr />
	  <div class="row">
  <div class="span24 doc-content">
	<div class="row" style="margin-bottom:20px">
	<div class="span8"><img src="{$L.APP_PIC}_300x300.jpg" /></div>
	<div class="span14"  style="margin-bottom:20px"><h2>{$L.APP_DESCRIP_TITLE}</h2><h4>{$L.APP_DESCRIP}</h4></div>
	<div class="span2">
		<button id="btn" class="button button-mini button-primary "><span class="js-version">{$version}</span><span class="x-caret x-caret-down"></span></button>
	</div>
	<div class="span14">
	<a class="button" href="/?m=Kxdr&c=Index&a=step1&create=1" style="width:180px;height:33px;padding-top:10px;margin-left:80px;border:2px solid #0068b7;"><h2>{$L.CREATE_EVENT}</h2></a>
	<a class="button" href="/?m=Kxdr&c=Content&a=sports_games" style="width:140px;height:33px;padding-top:10px;margin-left:20px;border:2px solid #84ccc9;"><h2>世界比赛</h2></a>
	<!-- 第一次上线，没有活动风暴 -->
	<!-- <a class="button" href="/?m=Kxdr&c=Content" style="width:140px;height:33px;padding-top:10px;margin-left:20px;border:2px solid #84ccc9;"><h2>{$L.SHOW_CONTENT}</h2></a> -->
	<br />
	<br />
	<div></div>
	</div>
	</div>
	  <ul class="toolbar">
        <li><a href="/?m=Kxdr&c=Index&a=index" class="button button-mini button-primary"><i class="icon-white icon-stop"></i>全部</a></li>
        <li><a href="/?m=Kxdr&c=Index&a=index&t=1&q={$q}" class="button button-mini button-info"><i class="icon-white icon-play"></i>进行中</a></li>
        <li><a href="/?m=Kxdr&c=Index&a=index&t=2&q={$q}" class="button button-mini"><i class="icon-pause"></i>已结束</a></li>
        <li>复制该地址装修到手淘：<input type="text" class="control-text span-width span6" value="{$url}/?sid={$sid}" /></li>
        <!-- <li><a href="/?m=Kxdr&c=Index&a=index&t=2&q={$q}" class="button button-mini mobile">手机全局外观</a></li>
        <li><a href="/?m=Kxdr&c=Index&a=index&t=2&q={$q}" class="button button-mini pc" style="background-position:5px 1px">PC全局外观</a></li> -->
        <li class="pull-right"><form method="post" action="/?m=Kxdr&c=Index"><input name="q" type="text" class=" input " value="{$q}" data-tip="{ldelim}ext : '{$L.APP_SEARTCH}'{rdelim}"/> <button class="button"><i class="icon-search"></i> {$L.APP_SEARTCH}</button></form></li>
      </ul> 
	  {if !$events}
	    <ul class="breadcrumb">
			<li class="active">{$L.APP_NO_EVENTS}</li>
		</ul>
	  {else}
		{foreach from=$events item=item key=key}
			<div class="panel {if $item.status=='running'}panel-primary{/if}">
			  <div class="panel-header clearfix js-event js-ev-{$item.id}" style="cursor:pointer" data-eid="{$item.id}">
				<h3 class="pull-left"><i class="icon-chevron-up {if $item.status=='running'}icon-white{/if} js-icon-{$item.id}"></i> [<span class="game_name{$item.game_id}">{$item.game_name}</span>] - <span class="event_title{$key}">{$item.title}</span>  {if $item.status=='stopped'}<i class="icon-pause"></i> {else}<i class="icon-play icon-white"></i> {/if} </h3><span class="auxiliary-text offset1" {if $item.status!='stopped'}style="color:#FFF"{/if}>({$item.player_quant}{$L.APP_TITLE_TIP1}，{$item.gift_quant}{$L.APP_TITLE_TIP2})</span>
				<!-- <a href="/?m=Kxdr&c=Index&a=step1&edit={$key}" class="button button-mini  pull-right js-edit-ev-{$item.id}" ><i class=" icon-pencil"></i></a> -->
				<button class="button button-mini  pull-right remove_event" data-eid="{$item.id}"><i class="icon-remove"></i>删除活动</button>
			  </div>
			  <div class="panel-body js-content-{$key} hide" style="line-height:24px">
			  <div class="title"><h1 class="pull-left event_title{$key}">{$item.title}</h1> <button class="button button-mini js-edit hide" data-value="{$item.title}" data-field="event_title" data-eid="{$key}"><i class=" icon-pencil"></i></button></div>
			  	<div class="button-group pull-right" style="margin-left:10px">
				  <!-- <a class="button mobile">手机外观</a>
				  <a class="button pc">PC外观</a> -->
				  <a class="button" href="/?m=Kxdr&c=event&a=user&eid={$item.id}"><i class="icon-user "></i>{$L.APP_WHO_GUESSING}</a>
				  <a class="button" href="/?m=Kxdr&c=event&a=user_gifts&eid={$item.id}"><i class="icon-user "></i>谁得奖了</a>
				  <!-- <a class="button">{$L.APP_SEND_GIFT}</a> -->
				</div>
				<div class="button-group pull-right">
				  <!-- <a class="button mobile">手机外观</a>
				  <a class="button pc">PC外观</a> -->
				  <a class="button button-info" href="/?m=Kxdr&c=event&a=add_result&game_id={$item.game_id}"><i class="icon-user icon-white"></i>比赛结果</a>
				  <!-- <a class="button">{$L.APP_SEND_GIFT}</a> -->
				</div>
			  <div class="span23" style="border-bottom:1px dashed #CCC;margin-bottom:10px;padding-bottom:10px">
				  <div class="span12">
				  <h3><span class="event_descrip{$key}">{$item.description|default:""}</span> <button class="button button-mini  js-edit hide hide" data-value="{$item.description|default:""}" data-field="event_descrip" data-eid="{$key}"><i class=" icon-pencil"></i></button></h3>
				  <h2>{$L.EVENT_GAME_NAME}：<span class="game_name{$item.game_id}">{$item.game_name}</span> <button class="button button-mini  js-edit hide " data-value="{$item.game_name}" data-field="game_name" data-eid="{$item.game_id}"><i class=" icon-pencil"></i></button></h2>
				  <h4>{$L.EVENT_START_TIME}：<span class="start_time{$item.game_id}">{$item.start_time|date_format:"%Y-%m-%d"}</span> <button class="button button-mini  js-edit hide " data-value="{$item.start_time|date_format:'%Y-%m-%d'}" data-field="start_time" data-eid="{$item.game_id}"><i class=" icon-pencil"></i></button></h4>
				  <h4>{$L.EVNET_LOCATION}：<span class="location{$item.game_id}">{$item.location|default:""}</span> <button class="button button-mini  js-edit hide " data-value="{$item.location|default:""}"data-field="location" data-eid="{$item.game_id}"><i class=" icon-pencil"></i></button></h4>
				  <h4>{$L.EVENT_DESCRIPTION}：<span class="game_descrip{$item.game_id}">{$item.game_descrip}</span> <button class="button button-mini  js-edit hide " data-value="{$item.game_descrip}" data-field="game_descrip" data-eid="{$item.game_id}"><i class=" icon-pencil"></i></button></h4>
				  </div>
				  {if !$item.players}
				  <a href="/?m=kxdr&c=Edit&a=players&eid={$key}&gid={$item.game_id}" class="button button-mini button-danger ">编辑队伍</a>
				  {/if}
				  <div class="span11 players" style="position: relative;">
				  <a href="/?m=kxdr&c=Edit&a=players&eid={$key}&gid={$item.game_id}" style="position:absolute;top:-20px" class="button button-mini button-danger hide">编辑队伍</a>
				  {foreach from=$item.players item=player key=pid}
				  <h3>{$L.PLAYER}：<span class="player_name{$player.id}">{$player.player_name}</span>  <button class="button button-mini  js-edit hide " data-value="{$player.player_name}" data-field="player_name" data-eid="{$player.id}"><i class=" icon-pencil"></i></button></h3>
				  <h4>{$L.PLAYER_DESCRIP}：<span class="player_descrip{$player.id}">{$player.player_descrip|default:""}</span>  <button class="button button-mini  js-edit hide " data-value="{$player.player_descrip|default:""}" data-field="player_descrip" data-eid="{$player.id}"><i class=" icon-pencil"></i></button></h4>
				  {/foreach}
				  </div>
			  </div>
			  <div class="span23">
				  <h2>{$L.EVENT_THINK_TYPE}：</h2>
				  <a href="/?m=kxdr&c=Edit&a=step3&eid={$key}" class="button button-mini button-danger  " >添加/删除奖品</a>
				  <a href="/?m=kxdr&c=Edit&a=players&eid={$key}&gid={$item.game_id}" class="button button-mini button-danger ">编辑队伍</a>
				  <h4 style="line-height:28px">{$L.EVENT_GIFTING_TIME}：<span class="gifting_time{$key}">{$item.gifting_time|date_format:"%Y-%m-%d %H:%M:%S"}</span><a class="button button-mini  js-edit hide " data-value="{$item.gifting_time}" data-field="gifting_time" data-eid="{$key}"><i class=" icon-pencil"></i></a></h4>
				  <div class="giftbox{$key}" style="position:relative;">
				  {foreach from=$item.gifts item=gift key=gid}
				  <div class="span4 offset1 giftshow{$key}" style="position:absolute">
					<h4>{$L.APP_PLAYER}：<span style="border-bottom:1px dotted #666">{$gift.player_name}</span></h4>
					
					{if $gift.event_player_descrip}
					<div class="tips tips-small tips-notice">{$gift.event_player_descrip}</div>
					{/if}
					{if $gift.title}
					<div class="tips tips-small tips-notice">{$gift.title}</div>
					{/if}
					<div>猜什么：<span class="badge badge-info think_type{$key}">{$gift.think_type}</span></div>
					<div>怎么猜：<span class="badge badge-success think_type{$key}">{$gift.think_type_way_name}</span></div>
					<h4><span class="gift_cffs_{$key}{$gid}">{$gift.cffs}</span>{$L.EVENT_VISIBLE_GIFT}：</h4>
					<img src="{$gift.pic_url}_40x40.jpg" />
					<h2><span class="gift_name_{$gift.gift_id}">{$gift.name}</span></h2>
					<h4 class="title">{$L.EVENT_GFIT_QUANT}：<span  class="show_tip" style="border-bottom:1px dotted #666"><span class="gift_event_quant_{$key}{$gid}">{$gift.event_quant}</span>{$L.EVENT_GIFT_UNIT}</span></h4>
					<h4 class="title">{$L.EVNET_GIFT_GETWAY}：<span class="show_tip gift_hqfs_{$key}{$gid}">{$gift.hqfs}</span></h4>
					<span class="title show_tip gift_hqfs gift_hqfs_str_{$key}{$gid}" style="border-bottom:1px dotted #666">
					{if $gift.advance=="first_get"}
					<p><span class="label label-info">先领先得</span></p>
					{/if}{if $gift.advance=="first_guess"}
					<p><span class="label label-info">先猜先得</span></p>
					{/if}
					{if $gift.advance=="lottery"}
					<p><span class="label label-info">概率抽奖</span><br />
					概率：{$gift.probability/1000}% 抽奖 {$gift.lottery_times|default:0}次<br />
					</p>
					{/if}{if $gift.advance=="order"}
					<p><span class="label label-info">输入订单号兑换</span><br />
					金额：{$gift.payment}元<br />
					付款时间：<br />
					{$gift.pay_time_start|date_format:"%m月%d日"} 至 
					{$gift.pay_time_end|date_format:"%m月%d日"}
					</p>
					{/if}{if $gift.advance=="friend_show"}
					<p style="border:1px solid #EEE;padding:2px">{$gift.show_title}<br />
					{$gift.show_content}</p>
					{/if}
					{if $gift.advance=="addcart"}
					<span class="label label-info">加购物车</span>
					<p>将1件商品加入购物车<button data-items="{$gift.cart_items}" class="button button-mini">查看</button></p>
					<p class="auxiliary-text">加购物车只做引导，不判定是否真的加入</p>
					{/if}
					{if $gift.advance=="collect"}
					<span class="label label-info">收藏商品</span>
					<p>收藏1件商品<button data-items="{$gift.collect_items}" class="button button-mini">查看</button></p>
					<p class="auxiliary-text">收藏只做引导，不判定是否真的收藏</p>
					{/if}
					{if $gift.advance=="metal"}
					<p><span class="label label-info">使用奖章兑换</span></p>
					<p>{$gift.medal_quant}个勋章：<br />【<img src="{$gift.medal_pic|cat:'_20x20'}" />{$gift.medal_name}】<br /></p>
					{/if}
					{if $gift.advance=="jifen"}
					<span class="label label-info">积分兑换</span>
					<p>使用{$gift.jifen|default:0}积分兑换</p>
					{/if}
					</span>
					{if $gift.rule_medal_id>0}
					<h4>必须持有该勋章：<br />【<img src="{$gift.rule_medal_pic|cat:'_20x20'}" />{$gift.rule_medal_name}】<br /></h4>
					{/if}
					<h4>{$L.EVENT_GIFT_PRICE}：<span  style="border-bottom:1px dotted #666"><span class="gift_price_{$key}{$gid}">{$gift.price}</span>元</span></h4>
				  </div>
				  {/foreach}
				  </div>
			  </div>
			  </div>
			</div>
		{/foreach}
		{/if}
    <div>
      <div class="pagination pull-right">
	  {$page}
      </div>
    </div>
</div>
      </div>
    </div>
  </div>
</body>
</html>